module(..., package.seeall)
pmd.ldoset(15, pmd.LDO_VLCD)
local ledon = true -- led是否开启
local pin5 = pins.setup(pio.P0_5, 0) -- 正常是低电平，模块开机时输出高
local function powerOnIndicatorLogic()
    if ledon then
        pin5(1)
    else
        pin5(0)
    end
    if net.getNetMode() ~= 0 and net.getRssi()>17 then
        ledon = not ledon
    else
        ledon = true
    end

    sys.timerStart(powerOnIndicatorLogic, 500) -- 一秒后执行指定函数
end
powerOnIndicatorLogic()
